#version 300 es
precision mediump float;
out vec4 fragColor;
in vec2 outPos;
in vec4 vColor;
uniform sampler2D texId;
layout(std140) uniform Light{
    vec4 ambient;
    vec4 diffuse;
    vec4 specular;
};

void main()
{
    vec2 pos = vec2(1.0f - outPos.x,1.0f - outPos.y);
//    fragColor = texture(texId,outPos);
    fragColor = (vColor + texture(texId,outPos))*vec4(vec3(gl_FragCoord.z),1);
}